home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
pcb15nw.zip
/
EVENT.DOC
< prev
next >
Wrap
Text File
|
1993-05-04
|
12KB
|
214 lines
Events
An event is simply a batch file that gets executed during a specific time of
the day. In this event batch file you could do some of the following things:
Pack your users and/or message bases
If you are part of a mail network, you will most likely transfer mail packets
Some third party products you use on your bulletin board may need to run
utilities to update data bases, etc.
Create a list of files on your system using PCBFiler and the /LIST parameter.
Backup your system
The previous examples are but only a few of the things you can do in your
event. Since events simply execute batch files you are more or less limited
by your imagination as far as what you want to run in your event.
Adding An Event
To define the events on your system, you need to go to PCBSetup | Event Setup.
Next, you need to make sure that you have answered Y to the Is a Timed Event
Active question.
Finally, if you cursor down to the EVENT.DAT line and press 2 you will a
screen that resembles the following:
══════════════════════════════════════════════════════════════════════════════
Event Information
Batch Begin End Last Days
Act Mod File Time Time Date Date SMTWTFS
═══ ═══ ════════ ═════ ═════ ════════ ════════ ═══════
1) Y E DAILY 06:45 07:00 03-29-93 YYYYYYY
2) Y S MORNING 05:00 06:00 03-29-93 YYYYYYY
3) Y S AFTRNOON 14:00 17:00 03-28-93 YYYYYYY
4) Y E NEWYEAR 00:15 00:30 01-01-00 01-01-93 YYYYYYY
5) Y E MONTHLY 01:00 01:30 00-01-00 03-01-93 YYYYYYY
6) Y E WEEKLY 01:00 01:30 03-05-93 YNNNNNN
7) N 00-00-00 NNNNNNN
8) N 00-00-00 NNNNNNN
9) N 00-00-00 NNNNNNN
10) N 00-00-00 NNNNNNN
11) N 00-00-00 NNNNNNN
12) N 00-00-00 NNNNNNN
13) N 00-00-00 NNNNNNN
14) N 00-00-00 NNNNNNN
15) N 00-00-00 NNNNNNN
Modes: E = Expedite (Non-sliding) S = Sliding
══ 11:38:01 ═══ 03-30-93 ══════ F1 ═ help ════ caps: OFF num: OFF ins: OFF ═
The number to the left of each line is the event number that is being
defined. The rest of the fields on the screen are as follows:
Act You may enter either a Y or an N in this field. A Y signifies
that the event is active and should be executed as configured.
If you enter an N then the event will be considered inactive
and will not be run as defined.
Mod The mode of the event. You may enter either an E or an S in
this field. If you enter an E then the event is a "rigid" or
non-sliding event. If you enter an S as the event type then
the event is referred to as a sliding event.If an event is an
expidited or non-sliding event then PCBoard will make it's
best attempt to execute the event at the time you specify as
the beginning time even if it means cutting users time short.
Batch File In this field, you need to specify the batch file you wish to
execute for the event you are defining. Note that you are
only given 8 characters for the batch filename. The reason
for this is that by default this batch file will be run on
all nodes. However, you can make node specific batch files by
making the node number the filename extension. For example,
if you entered a batch file of DAILY and you wanted node 5 to
execute a different batch file then you would create a
DAILY.005 file
Begin Time This is the earliest time that you event will be run. The
time that you enter in this field must be in 24 hour format
and there must be a colon between the hour and minutes.
End Time The end time is the latest possible time that you wish for
the event to run. If the event has not run by the time that
you enter, then the event will be skipped.
Date This field enables you to specify the dates that PCBoard will
run the event. For example, if you want the event to run on
the first day of every month, then you would enter a date of
00-01-00. Entering a 00 signifies a wildcard. Using the
previous example, this means that it would run for any month,
and any year, but only when the day of the month is equal to
01. Another example would be to set the date to 12-25-00.
This means that the event would run every Christmas day no
matter what
Last Date Contains the date that the event was last run on the node
number that is specified in PCBSetup | Node Configuration.
Not all events run system- wide therefore this field only
contains the last date ran for the node you are currently
editing.
Days You may also control which days that the event you are
defining is run on. In this field all seven days of the week
are listed begining with Sunday and ending with Saturday.
Simply enter either a Y or N which signifies whether you want
to run the event on the day listed or not.
As an example, let's say that you want to have an event that runs at 3:00am
every morning and packs your message bases. The first step would be to edit
your EVENT.DAT file in PCBSetup | Event Setup.
First of all, you will put a Y in the Act column, because this is an active
event and you do want it to run. Next, you would put an S in the Mod column
because you would like for this event to run at 3:00am but you would not mind
waiting for a caller to logoff before running the event.
Next, you need to enter a batch filename. For lack of a better name you can
enter PACKMSGS as the batch filename. Now you must enter the earliest time
that you wish for the event to run. As outlined earlier, you want this event
to begin at 3:00am so you would enter 03:00 in this column. If the latest
that you want the event to run is 08:00am, then you would need to enter 08:00
in the End Time column.
Finally, you need to specify the date and days that the event will run. If
you leave the Date column blank or filled with 00-00-00 it will run for every
day of the week that you specify in the Days columns. Because the event will
pack the message bases, you probably want it to run every day of the week so
you would put a Y in every day of the Days column. Once you have done this
you would have an entry which looks like the following:
Batch Begin End Last Days
Act Mod File Time Time Date Date SMTWTFS
--- --- -------- ----- ----- -------- -------- -------
1) Y S PACKMSGS 03:00 08:00 00-00-00 YYYYYYY
You have one last problem to overcome. You need to create the actual batch
file that will execute your event. In actuallity, this is very easy to do.
Simply highlight the batch file field you want to edit and press 2. Your
default text editor that you defined in System Manager | Define Text &
Graphics Editors will be used to edit the batch file.
For example, your batch file might look like this:
PCBPACK /AREA:ALL /MAXMSGS:1024 /MINMSGS:100 /DAYS:30
This batch file simply runs PCBPack on all message bases. Once the message
bases have been packed, BOARD.BAT is reloaded which will make the system once
again available for callers.
We have one final problem. By default this event would run on every node of
the system. Obviously this would not be a good idea to have every node
packing the message base at the same time. What you would do then, is to
rename your batch file from PACKMSGS to something like PACKMSGS.003. By
adding the .003 to the end of the filename, that tells PCBoard that it is a
node specific file and that only node 3 should run that batch file.
Multiple Nodes
Frequently, you will need more than one node to participate in an event
whether you want each node to perform a particular task or if you need all
nodes to be down, it is important to understand how to control your events.
Node Specific Events
Most likely you do not want all of your nodes to run the event batch file.
You may have one node that does all of the work while the other wait or do
some other tasks. In the EVENT.DAT file you specify the base event batch
filename. This is the batch file that will be executed for all nodes unless
there is a node specific event batch file.
To create a node specific event batch file, you simply create a file with the
batch filename and an extension of the node number. For example, if your
event batch file is called MAINT1 and if you wanted to make a batch file that
only node 6 would execute, then you would create a batch file called
MAINT1.006.
When event time rolls around, all of the nodes except node 6 will run the
event using the MAINT1 file. Of course, node 6 will use the MAINT1.006 file.
If you wanted only node 6 to run the event and the other nodes to not even
both going down for the event, then you would create the MAINT1.006 file and
then delete the MAIN1 file. Since the other nodes would not have a batch file
to execute, they will not execute the event.
Making Sure All Nodes Are Down
To perform global changes to the system such as sorting the user file, or
doing a total backup of your system, you will need all of your nodes to be
down. Perhaps the easiest way to accomplish this is to have your nodes
simply run a program as they begin the event that will count for a certain
amount of minutes or seconds while the event is running. When the nodes are
down counting, they can then reload the board.
As an example, let's assume that you are operating a three node system. You
want node 1 to sort the users file. In order to do this, nodes 2, and 3 must
not be operating. Quite simply, you create a node specific event file for
node 1. If you event batch file is called USRSORT then you would create an
event file called USRSORT.001. This batch file might look like the following:
@ECHO OFF
PCBSM /SORT;SECURITY;PRIREVERSEBOARD
In your testing, you have found out that it takes about 4 minutes to complete
the sorting process. Therefore, you need to make sure that the other nodes
stay down for a bare minimum of 4 minutes. Just to be safe, you could even
keep them down for 10 minutes or so because the time it takes to sort the file
will increase as the number of users on your system increases.
You should be able to find several utilities will will count for seconds or
minutes on the PCBoard Support BBS. For example, if you found one that was
called count and would count for the number of seconds specified, you would
want to make your USRSORT batch file look like the following:
@ECHO OFF
COUNT 480BOARD
Quite simply, this would make nodes 2 and 3 (because a USRSORT.002 or
USRSORT.003 file was not found) count for 480 seconds, then reload the
bulletin board. This should give more than ample time for the sort process
to be completed.
There are several other methods you can use to make sure all events are down
and stay down. Most of these have been addressed by third party authors and
are available on the PCBoard Support BBS by (Z)ippy scanning for EVENT.